package org.wu.framework.authorization.platform.application;

import org.wu.framework.authorization.platform.application.command.SysMenuCommand;
import org.wu.framework.authorization.platform.application.dto.SysMenuTreeDTO;
import org.wu.framework.authorization.platform.domain.model.sys.menu.SysMenu;
import org.wu.framework.web.response.Result;
import org.wu.framework.lazy.orm.core.persistence.reverse.lazy.ddd.DefaultDDDLazyApplication;

import java.util.List;

/**
 * describe
 *
 * @author Jia wei Wu
 * @date 2023/05/17 11:19 晚上
 * @see DefaultDDDLazyApplication
 **/

public interface SysMenuApplication {


    /**
     * describe 新增
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<SysMenu> save(SysMenuCommand sysMenuCommand);

    /**
     * describe 更新
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/
    Result<SysMenu> update(SysMenuCommand sysMenuCommand);

    /**
     * describe 查询单个
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<SysMenu> findOne(SysMenuCommand sysMenuCommand);

    /**
     * describe 查询多个
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<List<SysMenu>> findList(SysMenuCommand sysMenuCommand);


    /**
     * 查询菜单树
     * @param sysMenuCommand
     * @return
     */
    Result<List<SysMenuTreeDTO>> findTree(SysMenuCommand sysMenuCommand);
    /**
     * describe 删除
     *
     * @param
     * @return
     * @exception/throws
     * @author Jia wei Wu
     * @date 2023/05/17 11:19 晚上
     **/

    Result<SysMenu> delete(SysMenuCommand sysMenuCommand);

    /**
     * 批量存储 增量更新
     *
     * @param sysMenuCommandList
     * @return
     */
   Result upsert(List<SysMenuCommand> sysMenuCommandList);

    /**
     * 删除所有菜单
     * @param ids
     * @return
     */
    Result<SysMenu> deleteByIds(List<Integer> ids);
}